# !/usr/bin/env python
# coding: utf-8


from devicetest.core.test_case import TestCase, Step
from hypium import *


class Example(TestCase):
    def __init__(self, controllers):
        self.TAG = self.__class__.__name__
        TestCase.__init__(self, self.TAG, controllers)
        self.driver = UiDriver(self.device1)

    def setup(self):
        Step('1.回到桌面')
        self.driver.swipe_to_home()

    def process(self):
        Step('2.启动设置应用')
        self.driver.start_app(package_name="com.ohos.settings", page_name="com.ohos.settings.MainAbility")

    def teardown(self):
        Step('3.关闭设置应用')
        self.driver.stop_app("com.ohos.settings")
